package com.parsifal.openssldemo;

/**
 * Created by yangming on 17-7-9.
 */
public class SecurityUtil {

    static {
        System.loadLibrary("openssl-jni");
    }

    public static native void generateKey();

    public static native void releaseKey();

    public static native byte[] rsaEncrypt(byte[] data);

    public static native byte[] rsaDecrypt(byte[] data);

    public static native String getPublicKey();

    public static native byte[] rsaEncryptByExtPublicKey(byte[] data, String publicKey);
}
